package com.lyw.idempotentstarter.service;

import com.lyw.idempotentstarter.bean.IdempotentStorageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.UUID;

public class ProduceTokenService {

    @Autowired
    private IdempotentStorageService idempotentStorageService;

    public String produce(){
        String token = UUID.randomUUID().toString().replace("-", "");
        idempotentStorageService.storage("1",1L,"path", token);
        return token;
    }

}
